package com.lu.ClassWork;

/**
 * @author lufeng
 * @date 2021/9/4 15:47
 */
public class test2 {

    public static int[] getMax(int[] arr) {

        int max = arr[0];
        for (int i = 0; i < arr.length; i++) {
            if (arr[i] > max) {
                max = arr[i];
            }

        }
        int min = arr[0];
        for (int i = 0; i < arr.length; i++) {
            if (arr[i] < min) {
                min = arr[i];
            }

        }
        int [] manMin= {min,max};
        return manMin;
    }
}
